package com.oplink.webbase.modules.cfg.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.oplink.webbase.common.persistence.BaseDao;
import com.oplink.webbase.common.persistence.BaseDaoImpl;
import com.oplink.webbase.modules.cfg.entity.CfgNe;

/**
 * Configuration Network Element Dao
 * 
 * @author yizhang
 */
public interface CfgNeDao extends CfgNeDaoCustom, CrudRepository<CfgNe, Long> {
	@Query("from CfgNe where nename=?1")
	public CfgNe getByName(String name);

	@Query("from CfgNe where ip=?1")
	public List<CfgNe> getByIPList(String name);
}

interface CfgNeDaoCustom extends BaseDao<CfgNe> {

}

@Component
class CfgNeDaoImpl extends BaseDaoImpl<CfgNe> implements CfgNeDaoCustom {

}